package com.ml.loan.sys.controller;


import com.ml.loan.common.model.PageResult;
import com.ml.loan.sys.model.SysFiles;
import com.ml.loan.sys.service.SysFilesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author milian
 * @since 2022-08-22
 */
@Controller
@RequestMapping("/sys/files")
public class SysFilesController {

    @Autowired
    private SysFilesService sysFilesService;

    //    @RequiresPermissions("loginRecord:view")
    @RequestMapping()
    public String files() {
        return "system/sys_files.html" ;
    }

    @ResponseBody
    @RequestMapping("/list")
    public PageResult<SysFiles> list(Integer page, Integer limit, String startDate, String endDate) {
        return sysFilesService.list(page, limit, startDate, endDate);
    }
}
